<!--根据这个页单独设置样式-->
<style>
    .table-responsive{overflow-x: inherit}
    td{ vertical-align: middle!important;}
    .pagination{ margin:0!important;}
</style>
<div>
    <div class="bg-light lter b-b wrapper-md">
        <h1 class="m-n font-thin h3">属性管理</h1>
    </div>
    <div class="wrapper-md" >
        <div class="panel panel-default">
            <div class="panel-heading">
                <label class="control-label ">属性管理</label>
                <button class="btn btn-info btn-addon btn-sm pull-right" ui-sref="app.addAttr" ><i class="fa fa-plus"></i>添加属性</button>
<!--
                <button class="btn btn-primary btn-addon btn-sm pull-right" ui-sref="app.addAttrValue" style="margin-right: 10px;"><i class="fa fa-plus"></i>添加属性值</button>
-->
            </div>
            <div class="table-responsive">
                <table class="table table-striped  b-t b-light">
                    <thead>
                    <tr>
                        <th>id</th>
                        <th>名字</th>
                        <th>别名</th>
                        <th>后台显示</th>
                       <!-- <th>过滤显示</th>-->
                        <th>创建时间</th>
                        <th>结束时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="data in ctrl.vm.data">
                        <td>{{data.id}}</td>
                        <td>{{data.name}}</td>
                        <td>{{data.alias}}</td>
                        <td>
                            <span class="label ng-binding bg-success"
                                  ng-class="{'bg-danger':data.backend_show==0,'bg-success':data.backend_show==1}">
                            <label ng-if="data.backend_show==1">是</label>
                            <label ng-if="data.backend_show==0">否</label>
                            </span>
                        </td>
                      <!--  <td>{{data.fliter_show}}</td>-->
                        <td>{{data.created_at}}</td>
                        <td>{{data.updated_at}}</td>
                        <td><button class="btn btn-sm btn-info" ng-click="ctrl.vm.changeAttr(data)">修改</button></td>
                    </tr>
                    <tr  ng-if="ctrl.vm.data.length <= 0" class="text-center">
                        <td colspan="12">暂无数据！</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <footer class="panel-footer">
                <div class="row">
                    <div class="col-sm-2 hidden-xs">
                        <select
                                class="input-sm form-control w-sm inline v-middle"
                                ng-model="placement.selected"
                                ng-options="o as o for o in placement.options"
                                ng-change="placement.changeFn()"
                        >
                        </select>
                        <i style="float: right;padding: 2% 15% 0 0">总计{{ctrl.vm.page.total}}</i>
                    </div>
                    <div class="col-sm-10 text-right text-center-xs">
                        <div class="pagination pagination-sm m-t-none m-b-none">
                            <uib-pagination
                                    boundary-links="true"
                                    total-items="ctrl.vm.page.total"
                                    max-size="placement.pageSize"
                                    items-per-page="placement.selected"
                                    ng-model="ctrl.vm.page.current_page"
                                    ng-change="pageChanged()"
                                    class="pagination-sm"
                                    previous-text="&lsaquo;"
                                    next-text="&rsaquo;"
                                    first-text="&laquo;"
                                    last-text="&raquo;"
                            >
                            </uib-pagination>
                        </div>
                    </div>
                </div>
            </footer>
        </div>
    </div>
</div>
